home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d20 / msgq160s.arc / HELP.C < prev    next >
Text File  |  1991-10-26  |  5KB  |  242 lines

  1. /*
  2.  * HELP.C - Help for Msged/Q
  3.  *
  4.  * Msged/Q message editor for QuickBBS  Copyright 1990 by P.J. Muller
  5.  *
  6.  */
  7.  
  8. #include <string.h>
  9. #include <stdlib.h>
  10.  
  11. #include "msged.h"
  12. #include "screen.h"
  13.  
  14. #ifdef MINI        /* no help in mini version */
  15.  
  16. void help() {}
  17. void helpedit() {}
  18. void helparea() {}
  19. void helplist() {}
  20.  
  21. #else    /* not MINI */
  22.  
  23. /*
  24.  * Display a help page
  25.  * Order of commands: -|^#
  26.  */
  27.  
  28. static void helppage(char **msg)
  29. {
  30.   char *t;
  31.   BYTE x=1, y=1, ytop=1;
  32.  
  33.   cls();
  34.   while (*msg != NULL) {
  35.     t = *msg++;
  36.  
  37.     if (*t == '-') {        /* store y position for '|' */
  38.       ytop = y;  t++;
  39.     } /* if */
  40.  
  41.     if (*t == '|') {        /* second column */
  42.       x = maxx/2+1;  y = ytop;  t++;
  43.     } /* if */
  44.  
  45.     if (*t == '^') {        /* highlight */
  46.       set_color(co_hilite);
  47.       t++;
  48.     } else set_color(co_normal);
  49.  
  50.     if (*t == '#') {        /* center */
  51.       t++;
  52.       gotoxy((maxx-strlen(t))/2, y);
  53.     } else gotoxy(x,y);
  54.  
  55.     bputs(t);
  56.     y++;
  57.   } /* while */
  58.  
  59.   gotoxy(1,25);
  60.   bputs("Press any key to continue....");
  61.   video_update();
  62.   getkey();
  63. } /* helppage */
  64.  
  65. /*
  66.  * Message reading help
  67.  */
  68.  
  69. void help()
  70. {
  71.   static char *help[]={
  72.  
  73. "^# Msged/Q Message Reading Help ",
  74. "",
  75. "-^Message Movement",
  76. "",
  77. "Right/Left  Next/Previous message",
  78. "Enter       Move on in same direction",
  79. "Ctrl-Left   Follow message thread down",
  80. "Ctrl-Right  Follow message thread up",
  81. "Home        First message in thread",
  82. "End         Last message read",
  83. "Ctrl-Home   First message in area",
  84. "Ctrl-End    Last message in area",
  85. "Ctrl-N/P    Next/Prev area",
  86. "+/-         Next/Prev newmail area",
  87. "Alt-F       Find string in text/headers",
  88. "Alt-L       List headers and move",
  89. "Alt-Z       Find string in headers",
  90. "",
  91. "^Message Scrolling",
  92. "",
  93. "Up/Down     Scroll message by lines",
  94. "PgUp/PgDn   Scroll message by pages",
  95. "Space       Page down",
  96. "|^Message Operations",
  97. "",
  98. "Alt-C      Change message",
  99. "Alt-D      Delete message",
  100. "Alt-E      Enter message",
  101. "Alt-M      Move, Copy and Forward",
  102. "Alt-Q      Quote message in area",
  103. "Alt-N      Quote and move",
  104. "Alt-R      Reply to message",
  105. "Alt-W      Write message to file",
  106. "",
  107. "^Miscellaneous",
  108. "",
  109. "Alt-A      Select area",
  110. "Alt-G      Global area options",
  111. #ifndef MINI
  112. "Alt-O      Operating system shell",
  113. #endif
  114. #ifdef SETTINGS
  115. "Alt-S      Settings screen",
  116. #endif
  117. "Alt-U      Update high mark",
  118. "Alt-V      View hidden lines (toggle)",
  119. "Alt-H      This screen",
  120. "Alt-X/Esc  Exit Msged/Q",
  121. NULL};
  122.  
  123.   helppage(help);
  124. } /* help */
  125.  
  126. /*
  127.  * Message editing help
  128.  */
  129.  
  130. void helpedit()
  131. {
  132.   static char *help[]={
  133.  
  134. "^# Msged/Q Message Editing Help ",
  135. "",
  136. "-^Moving",
  137. "",
  138. "Right/Left  Next/Previous character",
  139. "Ctrl-Right  Next word",
  140. "Ctrl-Left   Previous word",
  141. "Home        Start of line",
  142. "End         End of line",
  143. "PgDn        Next page",
  144. "PgUp        Previous page",
  145. "Ctrl-PgUp   Start of page",
  146. "Ctrl-PgDn   End of page",
  147. "Ctrl-Home   Start of message",
  148. "Ctrl-End    End of message",
  149. "",
  150. "^Block commands",
  151. "",
  152. "Alt-A       Anchor a block",
  153. "Alt-C       Cut a block",
  154. "Alt-P       Paste a block",
  155. "|^Insert and Delete",
  156. "",
  157. "Ins         Toggle insert mode",
  158. "Del         Delete current character",
  159. "BackSpace   Delete previous character",
  160. "Alt-K       Delete to end of line",
  161. "Alt-D       Delete line",
  162. "Enter       Break a line",
  163. "",
  164. "^Miscellaneous",
  165. "",
  166. "Esc         Abort message",
  167. "Alt-S       Save message",
  168. #ifndef MINI
  169. "Alt-O       Operating system shell",
  170. #endif
  171. "Alt-I       Import text file",
  172. "Alt-W       Write message to text file",
  173. NULL};
  174.  
  175.   helppage(help);
  176. } /* helpedit */
  177.  
  178. /*
  179.  * Message listing help
  180.  */
  181.  
  182. void helplist()
  183. {
  184.   static char *help[]={
  185.  
  186. "^# Msged/Q Message List Help ",
  187. "",
  188. "^Moving",
  189. "",
  190. "Up          Move up",
  191. "Down        Move down",
  192. "PgDn        Next page",
  193. "PgUp        Previous page",
  194. "Ctrl-PgUp   Start of list",
  195. "Ctrl-PgDn   End of list",
  196. "",
  197. "^Miscellaneous",
  198. "",
  199. "Alt-A       Toggle netmail addresses on/off",
  200. NULL};
  201.  
  202.   helppage(help);
  203. } /* helplist */
  204.  
  205. /*
  206.  * Message areas help
  207.  */
  208.  
  209. void helparea()
  210. {
  211.   static char *help[]={
  212.  
  213. "^# Msged/Q Area Screen Help ",
  214. "",
  215. "",
  216. "",
  217. "-^Moving around",
  218. "",
  219. "Right   Next column",
  220. "Left    Previous column",
  221. "Down    Next line",
  222. "Up      Previous line",
  223. "Home    First area",
  224. "End     Last area",
  225. "PgDn    Down column",
  226. "PgUp    Up column",
  227. "+/-     Next/Prev newmail area",
  228. "",
  229. "Any other character: Incremental Search",
  230. "|^Miscellaneous",
  231. "",
  232. "Enter   Select new area",
  233. "Esc     Select original area",
  234. "Alt-T   Toggle descriptions/tags",
  235. "Alt-X   Exit Msged/Q",
  236. NULL};
  237.  
  238.   helppage(help);
  239. } /* helparea */
  240.  
  241. #endif /* MINI */
  242.